import { defineComponent, reactive, onMounted, ref, onUnmounted } from 'vue'
import Draw from './draw'

export default defineComponent({
  components: {
    Draw
  },
  setup() {
    const cdata = ref({
      xdata: [
        '2014',
        '2015',
        '2016',
        '2017',
        '2018',
        '2019',
        '2020',
        '2021',
        '2022',
        '2023',
        '一季度',
        '二季度',
        '三季度'
      ],
      data1: [3.5, 0.35, 4.85, 6.2, 8.3, 4.34, 3.35, 10.5, 3.6, 6.5, 8.1, 6.1, 6.6],
      data2: [7.3, 7.15, 7.05, 6.93, 8.8, 4.7, 3.15, 8.5, 3.4, 5.6, 5.0, 4.3, 4.6]
    })

    // 生命周期
    onMounted(() => {})

    onUnmounted(() => {})

    return () => {
      return <Draw cdata={cdata} />
    }
  }
})
